from google.appengine.ext import db

class Book(db.Model):
	uploader = db.UserProperty(auto_current_user_add=True)
	content = db.TextProperty()
	title = db.StringProperty()
	author = db.StringProperty()
	uploaded = db.DateTimeProperty(auto_now_add=True)
	def url(self):
		return "/"+self.key().name()
	def raw_url(self):
		return "/raw/"+self.key().name()
